package ch.areion.areionapp.io;

import ch.areion.areionapp.core.Disconnectable;
import ioio.lib.api.exception.ConnectionLostException;

public interface IIO extends Disconnectable {
	
	/**
	 * Waits until the capacitive sensor has the given value;
	 * @param irs The sensor to check.
	 * @param value The value, waiting for.
	 */
	void waitUntilCAP(boolean value) throws InterruptedException, ConnectionLostException;
	
	/**
	 * Reads the actual value of the capacitive sensor.
	 * @param irs The given sensor.
	 * @return True if has contact, false if not.
	 */
	boolean readCAP() throws InterruptedException, ConnectionLostException;
	
	/**
	 * This method set the boxnumber.
	 * @param boxnumber
	 * @throws ConnectionLostException
	 */
	public void setDisplayBoxnumber(BoxNumber boxnumber) throws ConnectionLostException;
	
	/**
	 * This method reset the display.
	 * @throws ConnectionLostException
	 */
	public void resetDisplayBoxnumber() throws ConnectionLostException;
	
	/**
	 * Sets the error on the display.
	 * @throws ConnectionLostException
	 */
	public void setError() throws ConnectionLostException;

}
